package com.zmn.oms.business.impl.factory;

import org.apache.dubbo.config.annotation.Reference;
import com.zmn.common.constant.GlobalConsts;
import com.zmn.common.dto.ResponseDTO;
import com.zmn.common.utils.map.Point;
import com.zmn.oms.business.interfaces.base.BaseCodeService;
import com.zmn.oms.business.interfaces.factory.OrderFactorySimpleBService;
import com.zmn.oms.common.constant.OrderConsts;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.order.OrderDTO;
import com.zmn.oms.model.entity.detail.OrderDetail;
import com.zmn.oms.model.entity.factory.OrderFactory;
import com.zmn.oms.model.entity.order.Order;
import com.zmn.oms.model.vo.factory.NavigationDistanceVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Objects;
import java.util.Optional;

/**
 * @author sunlife
 * @date:2020/7/3 3:35 下午
 * description:
 */
@Service
public class OrderFactorySimpleBServiceImpl implements OrderFactorySimpleBService {

    @Override
    public void processOrderFactory(OrderDTO orderDTO) throws OmsBaseException {
        OrderFactory orderFactory = orderDTO.getOrderFactory();

        if (orderFactory == null) {
            return;
        }

        //TODO sunlingfu 产品品牌如何处理？
        orderFactory.setFcProductId(0);
        orderFactory.setFcProductName("其他");
        orderFactory.setFcBrandId(1051);
        orderFactory.setFcBrandName(StringUtils.defaultString("其他品牌"));

        orderFactory.setRemoteAmount(0);
        orderFactory.setNavigationDistance(0);

        orderFactory.setPartReviewStatus(GlobalConsts.NONE);
        orderFactory.setPartReviewVersion(GlobalConsts.NONE);
        orderFactory.setFcPartReviewStatus(GlobalConsts.NONE);
        orderFactory.setFcPartReviewVersion(GlobalConsts.NONE);
    }

}
